home *** CD-ROM | disk | FTP | other *** search
/ The Ultimate Human Body 2.0 / Ultimate Human Body 2.0, The (1996)(Dorling Kindersley).iso / dksetup / dksetup.mst < prev    next >
Text File  |  1996-09-23  |  38KB  |  995 lines

  1. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. '   DKSETUP.MST     Generic Setup File
  3. '
  4. '   VERSION
  5. '   -------
  6. CONST STR_VERSION = "V 2.10.012"
  7. '
  8. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  9. 'Change History
  10. '--------------
  11. 'Version    Date        By  Description
  12. '-------    ----        --  -----------
  13. '2.10.012   10/06/96    SB Added code for installing DirectX II...
  14. '2.10.011   04/06/96    SB Fixed Bug with Developer... initalised bscrunged
  15. '2.10.010   23/05/96    SB  Created the Developer Dialog for installing either Scrunged or Text mode
  16. '2.10.009   02/04/96    CR  Re-Organised the groups of system drivers. No longer installs VFW
  17. '                           or the MSADPCM sound drivers on Windows 95.
  18. '2.10.008   10/04/96    CR  Stopped the user from being able to install to A:\.
  19. '                           It caused a crash on Win95.
  20. '2.10.007   03/04/96    CR  Removed the path in the device=dva.386 entry which is
  21. '                           put into system.ini. The Code is in UpdateWingDrivers in
  22. '                           Dkgen.inc. This stops a crash when installing Windows followed by
  23. '                           our product and then Office.
  24. '2.10.006   22/03/96    CR  Change the define WITH_SAMPLER_NOCM to WITH_FULL_SAMPLER.
  25. '                           This now installs the full sampler into the \DKMM\SAMPLER dir.
  26. '2.10.005   14/03/96    CR  Hide the Program Group window while adding the program icons.
  27. '2.10.004   27/02/96    CR  Changed most of the define names to make them more consistent.
  28. '2.10.003   27/02/96    CR  Added the INST_QTW define for installing QuickTime for Windows.
  29. '2.10.002   22/02/96    CR  The Fonts section in setup.inf needs a dummy placeholder
  30. '                           called NOFONT.ZZZ. Fonts are not registered for uninstall.
  31. '2.10.001   20/02/96    CR  Changed the setup files to separate Product Specific,
  32. '                           Localise Only and Generic information.
  33. '
  34. '16/02/96 Made the cursor 'Busy' while creating the program group/items.
  35. '14/02/96 Add the Sampler Icon name to the MMAPP.ini when using WITH_SAMPLER_NOCOM,
  36. '         so that uninstall can delete the Sampler Icon.
  37. '12/02/96 Added option to bundle sampler WITHOUT the Custom Menu.
  38. '25/01/96 Add WITH_ORDERING_INFO and MUSEUM_TITLE defines.
  39. '22/01/96 Fix the dialogs in the TestSystem function in Dkgen.inc.
  40. '15/12/95 Fix the Set Restart Directory problem when installing Win32s
  41. '14/12/95 Only delete files from the previous install if it was in a
  42. '         different directory. Otherwise it deletes the files just installed!
  43. '05/12/95 Reset the default install path when selecting back from the custom
  44. '         install dialog box and clear the copy list.
  45. '04/12/95 Move the mmapp.ini entry updates after the install.
  46. '31/11/95 Check the msacm.ini to make sure the audio compression is enabled.
  47. '29/11/95 Add the line in DKCODE\VERSION.INI to the main ini file. This is only
  48. '         used by the sampler3 product at the moment.
  49. '21/11/95 Can now handle a product + sampler3 bundle disc.
  50. '13/11/95 Add the Setup Version number to the About dialog box in the Setup.
  51. '08/11/95 Use the test for cirrus logic dirvers all of the time, not just
  52. '         when bundled with a sampler.
  53. '03/11/95 Cater for Win32s install and general tidy up of this script file.
  54. '         Unfortunately still need to use comments to select / deselect
  55. '         the specific font code parts.
  56. '18/08/95 rc and this have no min install. Changed dlg boxes custom,
  57. '         custom help and speed
  58. '18/08/95 Register notes most recent lang used
  59. '11/08/95 Register created using inf file
  60. '26/07/95 Uninstall code added
  61. '07/07/95 Correct dkgen.inc so unregisters use of ctl3d
  62. '04/07/95 Make sure files in bin section of inf file 'always' overwrite
  63. '28/07/95 Ini file not created for minimum install, uses file provided in dkcode
  64. '27/06/95 Test for directory names max 8 chars
  65. '26/06/95 For minimum install, ini file is now not installed
  66. '19/06/95 Moved test for cirrus drivers to mst file as only applies to sampler
  67. '05/06/95 Fonts installed on users machine
  68. '01/06/95 No choice about adding icon to prog man, altered dkgen.inc & rc file
  69. '            (custom, customhelp & speed dlg boxes need changing)
  70. '22/05/95 Code for bundling with sampler
  71. '22/05/95 Large readme need Write (will need to change dlg box in rc file)
  72. '15/05/95 No warning that directory does not exist
  73. '03/05/95 Ini file put in executable directory rather than Windows dir to stop
  74. '            clash with foreign products with same name files
  75. '
  76. '------------------------------------------------------------------------------
  77. '
  78. ' All of the defines which are used to control the flow of Setup are listed here.
  79. '
  80. 'SCRUNGED_OR_TEXT              Product will run in scrunge mode not test mode.
  81. '                                                   If not defined then assumes scrunged.
  82. '                       The ini file is different.
  83. ' WITH_UNINSTALL        Installs Uninstall with the product.
  84. ' WITH_ORDERING_INFO    Installs Ordering Information with the product.
  85. ' WITH_SAMPLER          Installs the Sampler with the product.
  86. '                       This sampler goes into the product directory.
  87. '                       This sampler has a Custom Menu.
  88. ' WITH_FULL_SAMPLER     Installs the full Sampler with the product.
  89. '                       This sampler goes into the sampler directory \DKMM\SAMPLER.
  90. '                       This sampler has its own icon and can be uninstalled separately.
  91. '                       The sampler files are listed in the SAMPBIN section of setup.inf.
  92. ' NEEDS_MUSEUM_LIFT     Installs the museum lift. (DKSWTCH.EXE)
  93. ' NEEDS_WIN32S          Installs Win32s.
  94. ' NEEDS_WING            Installs WinG.
  95. ' NEEDS_QTW             Installs QuickTime for Windows using Apple's own installer.
  96. ' NEEDS_VFW             Installs Video for Windows.
  97. ' NEEDS_SOUND           Installs ADPCM sound drivers.
  98. '
  99. '------------------------------------------------------------------------------
  100. ''$DEFINE DEBUG
  101. '$INCLUDE 'dkgen.inc'
  102. '
  103.  
  104. '$IFDEF NEEDS_WIN32S
  105.     ' Include extra Win32s specific routines
  106.     '$INCLUDE 'win32s.inc'
  107. '$ENDIF
  108.  
  109. DECLARE SUB CreateReg()
  110. DECLARE SUB Install()
  111. DECLARE SUB AddFilesToCopyList(szInstallType$)
  112. DECLARE SUB UpdateFonts()
  113. DECLARE FUNCTION IsCDROMDrive LIB "dkutils.dll" (wDrive%) As INTEGER
  114. DECLARE FUNCTION DeleteFiles LIB "dkutils.dll" (szDiffPath$, szProdName$, szDKREgIni$) AS INTEGER
  115. DECLARE FUNCTION DeleteDir LIB "dkutils.dll" (szDiffPath$) AS INTEGER
  116. DECLARE FUNCTION DeleteSection LIB "dkutils.dll" (szProdName$, szDKREgIni$) AS INTEGER
  117. DECLARE FUNCTION TestForCirrus LIB "dkutils.dll" () As INTEGER
  118. DECLARE FUNCTION GetCdVolumeLabel LIB "dkutils.dll" ( szCdVolumeLabel$, szCdDrive$ ) As INTEGER
  119. DECLARE FUNCTION InstallFont LIB "dkutils.dll" (szFont$) AS INTEGER
  120.  
  121.  
  122. Init:
  123.    Initialise STR_PRODUCTNAME, DEFAULT_INSTALL_PATH, STR_MSGCAPTION
  124.  
  125. WelcomeDlg:
  126.     if Welcome() = NAV_BACK then
  127.         ' Don nothing - cant go back
  128.     end if
  129.  
  130.     if TestSystem() = NAV_BACK then
  131.         goto WelcomeDlg
  132.     end if
  133.  
  134.  
  135.     '+++
  136.     '$IFDEF NEEDS_WIN32S
  137.  
  138.         if bInstalledWin32s = 0 then
  139.                 IF OnWindowsNT() THEN
  140.                 else
  141.                     goto InstallWin32s
  142.                 endif
  143.         endif
  144.  
  145.         FinishedWin32s:
  146.     '$ENDIF
  147.     '---
  148.  
  149.     '+++
  150.     '$IFDEF NEEDS_QTW
  151.  
  152.         ret% = InstallQTW()     ' Install QuickTime for Windows
  153.     '$ENDIF
  154.     '---
  155.  
  156.     '   TestCirrus:
  157.     if TestForCirrus() = 1 then
  158.         dButton = DoMsgBox(STR_CIRRUS, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  159.     end if
  160.  
  161.  
  162.     '$IFDEF NEEDS_SOUND
  163.         ' Update the Sound driver ini entries
  164.         if UpdateADPCMDrivers() = NAV_BACK then
  165.             goto WelcomeDlg
  166.         end if
  167.     '$ENDIF
  168.  
  169. ' The Developer Dialogue stuff...
  170. '$IFDEF SCRUNGED_OR_TEXT
  171. beginDevelopDiag:
  172.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_DEVELOPER, "FQuitDlgProc", 0, "")
  173.     select case szButton
  174.     case "REACTIVATE"
  175.         goto beginDevelopDiag
  176.     case "EXIT" , "CANCEL"
  177.         bscrunged=0 ' Text Mode
  178.         UIPop 1
  179.     case "CONTINUE"
  180.         bscrunged=1 ' Scrunge Mode
  181.         UIPop 1
  182.     end select
  183. '$ELSE
  184.     bscrunged=1
  185. '$ENDIF
  186.  
  187. ExpressCustomDlg:
  188.     ' defaults to Express
  189.     'if szExpressCustomChoice = "EXPRESS" then
  190.     '    SetSymbolValue "RadioDefault", "1"
  191.     'else
  192.     '    SetSymbolValue "RadioDefault", "1"
  193.     'end if
  194.  
  195. ECDlgLoop:
  196.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_SPEED, "FRadioDlgProc", DLG_WHIZZHELP, PROC_HELP)
  197.  
  198.     select case szButton
  199.     case "REACTIVATE"
  200.         goto ECDlgLoop
  201.     case "BACK"
  202.         UIPop 1
  203.         goto WelcomeDlg
  204.     case "CONTINUE" ' Install
  205.         UIPop 1
  206.         if GetSymbolValue("ButtonChecked") = "1" then
  207.             szExpressCustomChoice = "EXPRESS"
  208.             goto ExpressInstallLoop
  209.         else
  210.             szExpressCustomChoice = "CUSTOM"
  211.             goto CustomInstallLoop
  212.         end if
  213.     case "EXIT" , "CANCEL"
  214.         AskQuit
  215.         goto ECDlgLoop
  216.     end select
  217.  
  218.  
  219. CustomInstallLoop:
  220. GetPathDlg:
  221.     SetSymbolValue "EditTextIn", szDestPath
  222.     szOldDestPath = szWinDrive + ":" + DEFAULT_INSTALL_PATH
  223.     SetSymbolValue "EditFocus", "ALL"
  224.  
  225. GetPathDlgLoop:
  226.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_DESTPATH, "FEditDlgProc", DLG_PATHHELP, PROC_HELP)
  227.  
  228.     select case szButton
  229.     case "REACTIVATE"
  230.         goto GetPathDlgLoop
  231.  
  232.     case "BACK"
  233.         UIPop 1
  234.         szDestPath = szOldDestPath
  235.         ClearCopyList
  236.         goto ECDlgLoop
  237.  
  238.     case "CONTINUE"
  239.         UIPop 1
  240.         szDestPath = GetSymbolValue("EditTextOut")
  241.  
  242.         ' Add backslash if missing
  243.         if mid$(szDestPath, 2, 1) = ":" and mid$(szDestPath, 3, 1) <> "\" then
  244.             szTemp$ = mid$(szDestPath, 1, 2) + "\" + mid$(szDestPath, 3, len(szDestPath)-2)
  245.             szDestPath = szTemp
  246.         end if
  247.  
  248.         ' Add drive letter and :\ if missing
  249.         if mid$(szDestPath, 2, 1) <> ":" then
  250.             if mid$(szDestPath, 1,1) <> "\" then
  251.                 szDestPath = mid$(szWinPath, 1,1) + ":\" + szDestPath
  252.             else
  253.                 szDestPath = mid$(szWinPath, 1,1) + ":" + szDestPath
  254.             end if
  255.         elseif IsDriveValid(mid$(szDestPath, 1,1)) = 0 then
  256.             szDestPath = szOldDestPath
  257.             UIPop 1
  258.             BadPath
  259.             goto GetPathDlg
  260.         end if
  261.  
  262.         slength% = len(szDestPath)
  263.  
  264.         'Check dir names not > 8 chars
  265.         dirlength% = 0
  266.         i% = 3
  267.         while i% <> slength%
  268.             i% =i%+1
  269.             dirlength% = dirlength% +1
  270.             if mid$(szDestPath, i%, 1)="\" then
  271.                 if dirlength% > 9 then
  272.                     szDestPath = szOldDestPath
  273.                     dButton = DoMsgBox( STR_DIRTOOLONG, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  274.                     goto GetPathDlg
  275.                  else
  276.                     dirlength% = 0
  277.                 endif
  278.             end if
  279.         wend
  280.         if dirlength% > 8 then
  281.             szDestPath = szOldDestPath
  282.             dButton = DoMsgBox( STR_DIRTOOLONG, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  283.             goto GetPathDlg
  284.         endif
  285.  
  286.  
  287.         ' check for "foreign" chars in path
  288.         found% = 0
  289.         for i% = 1 to slength%
  290.             if asc(mid$(szDestPath, i%, 1)) > 126 then
  291.                 found% = 1
  292.             end if
  293.         next i%
  294.         if found% = 1 then
  295.             szDestPath = szOldDestPath
  296.             UIPop 1
  297.             BadPath
  298.             goto GetPathDlg
  299.         end if
  300.  
  301.         wDrive% = asc(mid$(szDestPath, 1,1)) - asc("A")
  302.         if IsCDROMDrive(wDrive%) > 0 then
  303.             szDestPath = szOldDestPath
  304.             UIPop 1
  305.             BadPath
  306.             goto GetPathDlg
  307.         end if
  308.  
  309.         if IsDriveNetwork(mid$(szDestPath,1,1)) = 1 then
  310.             szDestPath = szOldDestPath
  311.             UIPop 1
  312.             NetworkDrive
  313.             goto GetPathDlg
  314.         end if
  315.  
  316.         ' Put in to avoid a:\ crash below
  317.         if mid$(szDestPath,1,3) = "A:\" then
  318.             szDestPath = szOldDestPath
  319.             UIPop 1
  320.             BadPath
  321.             goto GetPathDlg
  322.         end if
  323.  
  324.         ' IsDirWritable() Crashes on Win95 if looking at A:\ with no disk in!
  325.         if IsDirWritable(szDestPath) = 0 then
  326.             szDestPath = szOldDestPath
  327.             UIPop 1
  328.             BadPath
  329.             goto GetPathDlg
  330.         end if
  331.  
  332.  
  333.   '      if DoesDirExist(szDestPath) = 0 then
  334.   '          dButton = DoMsgBox( STR_DIRNOTEXIST, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  335.   '          if dButton = 7 then
  336.   '              goto GetPathDlg
  337.   '          end if
  338.   '      end if
  339.  
  340.         UIPop 1
  341.  
  342.     case "EXIT" , "CANCEL"
  343.         AskQuit
  344.         goto GetPathDlg
  345.     end select
  346.  
  347. GetCustomChoicesDlg:
  348.     SetSymbolValue "CheckItemsState", ""
  349. '    AddListItem "CheckItemsState", szMinimalInstall
  350. '    AddListItem "CheckItemsState", szAddPMItem
  351. GetCustomChoicesLoop:
  352.  
  353.     ClearCopyList
  354. '    if szMinimalInstall = "OFF" then
  355.         AddFilesToCopyList "FULL"
  356. '    else
  357. '        AddFilesToCopyList "MINIMAL"
  358. '    end if
  359.  
  360.     dDestDrive = asc(mid$(szDestPath, 1,1)) - asc("A")+1
  361.     dWinDrive = asc(mid$(szWinPath, 1,1)) - asc("A")+1
  362.  
  363.     SetSymbolValue "DriveStatusText", ""
  364.     AddListItem "DriveStatusText", mid$(szDestPath, 1,1) + ":"
  365.     AddListItem "DriveStatusText", str$(GetDiskSpaceNeeded(dDestDrive) / 1024) + " K"
  366.     AddListItem "DriveStatusText", str$(GetFreeSpaceForDrive(mid$(szDestPath, 1,1))/1024) + " K"
  367.  
  368.     if dDestDrive = dWinDrive then
  369.         AddListItem "DriveStatusText", ""
  370.         AddListItem "DriveStatusText", ""
  371.         AddListItem "DriveStatusText", ""
  372.     else
  373.         AddListItem "DriveStatusText", mid$(szWinPath, 1,1) + ":"
  374.         AddListItem "DriveStatusText", str$(GetDiskSpaceNeeded(dWinDrive)/ 1024 ) + " K"
  375.         AddListItem "DriveStatusText", str$(GetFreeSpaceForDrive(mid$(szWinPath, 1,1))/1024) + " K"
  376.     end if
  377.  
  378.     AddListItem "DriveStatusText", szDestPath
  379.  
  380. ChooseInstall:
  381.  
  382.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_CUSTOM, "FCustInstDlgProc", DLG_CUSTOMHELP, PROC_HELP)
  383.  
  384. '    szMinimalInstall = GetListItem("CheckItemsState", 1)
  385. '    szAddPMItem = GetListItem("CheckItemsState", 2)
  386.  
  387.     select case szButton
  388.     case "REACTIVATE"
  389.         goto GetCustomChoicesLoop
  390.     case "BACK"
  391.         UIPop 1
  392.         goto GetPathDlg
  393.     case "CONTINUE"
  394.         UIPop 1
  395.     case "EXIT" , "CANCEL"
  396.         AskQuit
  397.         goto GetCustomChoicesLoop
  398.     end select
  399.  
  400.     ClearCopyList
  401. '    if szMinimalInstall = "OFF" then
  402.         AddFilesToCopyList "FULL"
  403. '    else
  404. '        AddFilesToCopyList "MINIMAL"
  405. '    end if
  406.     goto CommonInstallLoop
  407.  
  408. ExpressInstallLoop:
  409.     AddFilesToCopyList "FULL"
  410.     goto CommonInstallLoop
  411.  
  412. CommonInstallLoop:
  413.     InitCommonInstall
  414.  
  415.     if szMinimalInstall = "ON" and GetFreeSpaceForDrive(mid$(szDestPath,1,1)) < MINIMUM_DISK_SPACE then
  416.         error ERR_NODISKSPACE
  417.     elseif GetFreeSpaceForDrive(mid$(szDestPath,1,1)) < GetDiskSpaceNeeded( asc(mid$(szDestPath, 1,1))-asc("A")+1 ) then
  418.         error ERR_NODISKSPACE
  419.     end if
  420.  
  421.     '+++
  422.     '$IFDEF NEEDS_WING
  423.  
  424.         UpdateWinGDrivers
  425.     '$ENDIF
  426.     '---
  427.  
  428.     '+++
  429.     '$IFDEF NEEDS_VFW
  430.  
  431.         ' Don't need to install VFW on Windows 95, it is already there.
  432.         if not OS_Windows95 then
  433.  
  434.             UpdateIndeoAVIDrivers
  435.         end if
  436.  
  437.     '$ENDIF
  438.     '---
  439.  
  440.     UpdateFonts ' Installs specific fonts
  441.  
  442.     Install     ' Installs all of the necessary files.
  443.  
  444.     dCursor = ShowWaitCursor()
  445.  
  446.     ' Always create the DK Registry and enter the details
  447.     CreateIniKeyValue "Win.ini", "MMAPP", WIN_INI_ENTRY, szWinDrive+":"+DKREG_INI_PATH, cmoOverwrite
  448.     CreateReg
  449.  
  450.     ' Get the current window handle for setting its properties later
  451.     hwndSetup = GetActiveWindow
  452.  
  453. '******************************************************************************************************************************
  454. '******************************************************************************************************************************
  455. ' Here is the code for DirectX...
  456. 'It requires the program simple.exe to be copied to the temp directory, along with the DirectX DLL's and the DirectX direcory to be located under DKSetup
  457. '$IFDEF NEEDS_DIRECTX
  458.  
  459.         if OS_Windows95 then
  460.                 ' NT v4 (looks like Win95) Has DirectX Installed... Do NOT install Win95 DirectX II
  461.                 if OnWindowsNT() then
  462.                 else
  463.                     ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  464.                     szDirectCommand="SetupDX2.exe "+szSrcSetupPath
  465.                     intreply=RUN (szDirectCommand)
  466.  
  467.                     ' Wait for Direct X Install to Finish.
  468.                     szErrorCode = ""
  469.                     WHILE szErrorCode = ""
  470.                         ' Look in MMAPP,INI for the DKDirectX group and check the ErrorCode
  471.                         szErrorCode = GetIniKeyString (szWinDrive+":"+DKREG_INI_PATH, "DKDirectX", "ErrorCode")
  472. 'dButton = DoMsgBox( szErrorCode,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  473.                      WEND
  474. 'dButton = DoMsgBox( "Ended the loop","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  475. 'intReply = LEN(szErrorCode)
  476.                      szReply = MID$(szErrorCode,1,1)
  477. 'dButton = DoMsgBox( szReply,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  478.                      if szReply = "-" then
  479.                         dButton = DoMsgBox( "An error occured while installing DirectX","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  480.                         ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  481.                         error ERR_EXITFAIL
  482.                     else
  483. 'dButton = DoMsgBox( "No errors","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  484.                         'ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  485.                         if szReply = "1" then
  486. 'dButton = DoMsgBox( "Restart","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  487.                                 bInstalledWin32s = 1
  488.                         endif
  489.                     endif
  490.                     ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  491.                 endif
  492.         endif
  493.  
  494. '$ENDIF
  495. '******************************************************************************************************************************
  496. '******************************************************************************************************************************
  497.  
  498.     CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  499.     ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  500.  
  501.     ' Set the main window properties to bring the main window to the front.
  502.     ' This is so the user cannot start the app now, but will see the prog group after setup!
  503.     i% = SetWindowPos(hwndSetup, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE+SWP_NOMOVE)
  504.  
  505.  
  506. '+++
  507. '$IFDEF WITH_SAMPLER
  508.  
  509. '    if szMinimalInstall = "ON" then
  510. '        szSamplerPath$ = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), SAMPLER_PATH)
  511. '        szSamplerPath$ = MakePath(szSamplerPath$, SAMPLER_EXE_FILE)
  512. '        szInf$ = MakePath(szSrcBinPath, APPLICATION_MENU_FILE) + " " + MakePath(szSrcBinPath, APPLICATION_EXE_FILE) + " " + MakePath(szSrcBinPath, APPLICATION_PENGE_FILE) + " " + szSamplerPath$
  513. '        CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  514. '        CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szSrcBinPath, APPLICATION_README_FILE), "", cmoOverwrite
  515. '    else
  516.         szSamplerPath$ = MakePath(szDestPath, SAMPLER_EXE_FILE)
  517.         szInf$ = MakePath(szDestPath, APPLICATION_MENU_FILE) + " " + MakePath(szDestPath, APPLICATION_EXE_FILE) + " " + MakePath(szDestPath, APPLICATION_PENGE_FILE) + " " + szSamplerPath$
  518.         CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  519.         CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szDestPath, APPLICATION_README_FILE), "", cmoOverwrite
  520.         '$IFDEF WITH_ORDERING_INFO
  521.         CreateProgmanItem STR_COMPANYNAME, STR_ORDER, EDITOR_EXE + MakePath(szWinDrive + ":" + DKREG_INI_DIR, ORDER_FILE), "", cmoOverwrite
  522.         '$ENDIF
  523. '    end if
  524.  
  525. '$ELSE
  526.     'NO SAMPLER
  527. '    if szMinimalInstall = "ON" then
  528. '        szInf$ = MakePath(szSrcBinPath, APPLICATION_EXE_FILE) + " " + MakePath(szSrcBinPath, "dkpage")'APPLICATION_PENGE_FILE)
  529. '        CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  530. '        CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szSrcBinPath, APPLICATION_README_FILE), "", cmoOverwrite
  531. '    else
  532.         szInf$ = MakePath(szDestPath, APPLICATION_EXE_FILE) + " " + MakePath(szDestPath, "dkpage")'APPLICATION_PENGE_FILE)
  533.         CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  534.         CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szDestPath, APPLICATION_README_FILE), "", cmoOverwrite
  535.  
  536.         '$IFDEF WITH_ORDERING_INFO
  537.         CreateProgmanItem STR_COMPANYNAME, STR_ORDER, EDITOR_EXE + MakePath(szWinDrive + ":" + DKREG_INI_DIR, ORDER_FILE), "", cmoOverwrite
  538.         '$ENDIF
  539.  
  540.         '$IFDEF WITH_FULL_SAMPLER
  541.         CreateProgmanItem STR_COMPANYNAME, STR_SAMPLER, MakePath(szFullSampPath, SAMPLER_EXE_FILE), "", cmoOverwrite
  542.         CreateProgmanItem STR_COMPANYNAME, STR_SAMPLER_README, MakePath(szFullSampPath, SAMPLER_README_FILE), "", cmoOverwrite
  543.         '$ENDIF
  544.  
  545. '    end if
  546. '$ENDIF
  547. '---
  548.  
  549.     '+++
  550.     '$IFDEF WITH_UNINSTALL
  551.  
  552.         'Uninstall icon
  553.         szDKUninstall$ = szWinDrive + ":" +  DKREG_INI_DIR
  554.         szInf$ = MakePath( szDKUninstall, UNINSTALL_EXE_FILE)
  555.         CreateProgmanItem STR_COMPANYNAME, STR_UNINSTALL, szInf, szInf, cmoOverwrite
  556.     '$ENDIF
  557.     '---
  558.  
  559. '$IFDEF DEBUG
  560.  
  561.     DumpCopyList MakePath(szDestPath, "copylist.txt")
  562.  
  563. '$ENDIF
  564.  
  565.  
  566.     RestoreCursor( dCursor )
  567.  
  568.     If EndCommonInstall( APPLICATION_README_FILE, 0, EDITOR_EXE ) = NAV_EXIT then
  569.         stop
  570.         end
  571.     endif
  572.  
  573. quit:
  574.     on error goto quit
  575.  
  576.     select case ERR
  577.  
  578.     case 0
  579.         hDlg = DLG_SUCCESS
  580.     case STFQUIT
  581.         hDlg = DLG_BADEXIT
  582.     case ERR_NODISKSPACE
  583.         hDlg = DLG_NODISKSPACE
  584.     case else
  585.         hDlg = DLG_ABORT
  586.     end select
  587.  
  588.     UIPop 10
  589. quit2:
  590.     szButton = UIStartDlg(CUIDLL_FILENAME, hDlg, "FInfo0DlgProc", 0, "")
  591.     select case szButton
  592.     case "REACTIVATE"
  593.         goto quit2
  594.     end select
  595.  
  596.     UIPop 1
  597.     DeInitialise
  598.     stop
  599.     end
  600.  
  601. quitError:
  602.     dButton = DoMsgBox (STR_QUITERROR, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  603.     DeInitialise
  604.     stop
  605.     end
  606.  
  607.  
  608. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  609.  
  610. Sub Install() STATIC
  611.  
  612.     cursor% = ShowWaitCursor()
  613.     CreateDir szDestPath, cmoNone
  614.  
  615.     '$IFNDEF NEEDS_WIN32S
  616.         SetRestartDir szDestPath    '   Already set if needs Win32s
  617.     '$ENDIF
  618.  
  619.     RestoreCursor(cursor%)
  620.  
  621.     CopyFilesInCopyList  'creates dir even if min install
  622.  
  623.     '+++
  624.     '$IFDEF NEEDS_VFW
  625.  
  626.         ' Don't need to install VFW on Windows 95, it is already there.
  627.         if OS_Windows95 = 0 then
  628.  
  629.             Run ("regedit.exe /s " + MakePath(szWinPath, "mplayer.reg"))
  630.             Run ("regedit.exe /s " + MakePath(szWinSysPath, "OLE2.reg"))
  631.  
  632.             '+++
  633.             '$IFNDEF NEEDS_WIN32S
  634.                 ' NOT with WIN32S
  635.                 Run ("regedit.exe /s " + MakePath(szWinSysPath, "cleanup.reg"))
  636.             '$ENDIF
  637.             '---
  638.  
  639.             Run ("profdisp.exe")
  640.  
  641.         end if
  642.     '$ENDIF
  643.     '---
  644.  
  645.     if INI_FILE_SOURCE = "AppPath" then
  646.         szAppINIPath = MakePath(szDestPath, APPLICATION_INI_FILE)
  647.     else
  648.         szAppINIPath = MakePath(szWinPath, APPLICATION_INI_FILE)
  649.     end if
  650.  
  651.        '=d:\                                    =d:\dksetup                =dksetup
  652.     szPengePath = mid$(szSrcSetupPath, 1,len(szSrcSetupPath)-len(SOURCE_SETUP_SUBDIR)-2) ' -2 removes backslash
  653. '+++
  654. '$IFDEF WITH_SAMPLER
  655.         szSampINIPath = MakePath(szDestPath, SAMPLER_INI_FILE)
  656.         'data =
  657.         szSampData = szPengePath + "\" + SAMPLER_PATH
  658.         CreateIniKeyValue szSampINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szSampData, cmoOverwrite
  659.         'volumelabel =
  660.         szCdDrive$ = mid$( szSrcSetupPath, 1, 1 )
  661.         szCdVolumeLabel$ = STRING$( 20, 32 )
  662.         if( GetCdVolumeLabel( szCdVolumeLabel$, szCdDrive$ ) ) then
  663.             CreateIniKeyValue MakePath(szDestPath, SAMPLER_INI_FILE), PRODUCT_INI_DIR_SECTION_NAME, "VolumeLabel", szCdVolumeLabel$, cmoOverwrite
  664.         endif
  665. '$ENDIF
  666. '---
  667.  
  668. '+++
  669. '$IFDEF WITH_FULL_SAMPLER
  670.         szSampINIPath = MakePath(szFullSampPath, SAMPLER_INI_FILE)
  671.         'data =
  672.         szSampData = szPengePath + "\" + SAMPLER_PATH
  673.         CreateIniKeyValue szSampINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szSampData, cmoOverwrite
  674. ' Don't want to force a specific cd for the full sampler!
  675. '        'volumelabel =
  676. '        szCdDrive$ = mid$( szSrcSetupPath, 1, 1 )
  677. '        szCdVolumeLabel$ = STRING$( 20, 32 )
  678. '        if( GetCdVolumeLabel( szCdVolumeLabel$, szCdDrive$ ) ) then
  679. '            CreateIniKeyValue MakePath(szDestPath, SAMPLER_INI_FILE), PRODUCT_INI_DIR_SECTION_NAME, "VolumeLabel", szCdVolumeLabel$, cmoOverwrite
  680. '        endif
  681. '$ENDIF
  682. '---
  683.  
  684. '+++
  685. ''$IFDEF SCRUNGED
  686. if bscrunged then
  687. '    if szMinimalInstall = "OFF"  then
  688.         'data =
  689.         ' Enter the data section into the product.ini file with the backslash... (data=?:\)
  690.         CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szPengePath+"\", cmoOverwrite
  691. '    endif
  692.  
  693. ''$ELSE
  694. else
  695.     'DEBUG VERSION
  696.     'data =
  697.     CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, MakePath(szPengePath,"data"), cmoOverwrite
  698.     'pages =
  699. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Pages", MakePath(szPengePath,"dkpage"), cmoOverwrite
  700. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Scrunge", "0", cmoOverwrite
  701. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Developer", "1", cmoOverwrite
  702. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Debug", "1", cmoOverwrite
  703.  
  704. ''$ENDIF
  705. endif
  706. '---
  707.  
  708. if APPLICATION_EXE_FILE = "sampler.exe" then
  709.     ' Add version entry from version.ini if found
  710.     szSampVersion = GetIniKeyString( MakePath( szSrcBinPath, "VERSION.INI" ), "VERSION", "VERSION" )
  711.     if len( szSampVersion ) > 0 then
  712.         CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Version", szSampVersion, cmoOverwrite
  713.     endif
  714. endif
  715.  
  716.     ' Add any custom ini entries in the function in product.inc
  717.     CustomIniEntries
  718.  
  719. End Sub
  720.  
  721. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  722. Sub AddFilesToCopyList(szInstallType$) STATIC
  723.     cursor% = ShowWaitCursor()
  724.  
  725.     szDKUninstall$ = szWinDrive + ":" +  DKREG_INI_DIR
  726.  
  727.     'Shared Files : For ORDER.WRI & FOR MUSEUM TITLES (DKSWTCHW.EXE) Put in \MMAPP
  728.     '$IFDEF WITH_ORDERING_INFO OR NEEDS_MUSEUM_LIFT
  729.     AddSectionFilesToCopyList SETUP_INI_SH_BINARIES_SECTION_NAME, szSrcBinPath, szDKUninstall
  730.     '$ENDIF
  731.     '+++
  732.     '$IFDEF WITH_FULL_SAMPLER
  733.  
  734.         AddSectionFilesToCopyList SAMPLER_BINARIES_SECTION_NAME, szSrcBinPath, szFullSampPath
  735.  
  736.     '$ENDIF
  737.     '---
  738.  
  739.     '+++
  740.     '$IFDEF WITH_UNINSTALL
  741.  
  742.         AddSectionFilesToCopyList "UNINSTALL", szSrcBinPath, szDKUninstall
  743.  
  744.     '$ENDIF
  745.     '---
  746.  
  747. '+++
  748. '$IFDEF SCRUNGED_OR_TEXT
  749.  
  750.     if bscrunged = 0 then
  751.         AddSectionFilesToCopyList "BIN TEXT", szSrcBinPath + "\TEXT", szDestPath
  752.     else
  753.         AddSectionFilesToCopyList "BIN SCRUNGED", szSrcBinPath + "\SCRUNGE", szDestPath
  754.     end if
  755.  
  756. '$ELSE
  757.     if OS_Windows95 = 0 then  'I6 bit
  758.         AddSectionFilesToCopyList "BIN 16", szSrcBinPath + "\DKCode16", szDestPath
  759.     else
  760.         AddSectionFilesToCopyList "BIN 32", szSrcBinPath, szDestPath
  761.     end if
  762.  
  763.  
  764. '$ENDIF
  765. '---
  766. '    select case szInstallType
  767. '    case "FULL"
  768.     AddSectionFilesToCopyList SETUP_INI_BINARIES_SECTION_NAME, szSrcBinPath, szDestPath
  769.  
  770. '    case "MINIMAL"
  771. '        ' nothing
  772. '    end select
  773.  
  774.  
  775.     '+++
  776.     '$IFDEF NEEDS_WING
  777.         AddSectionFilesToCopyList SETUP_INI_WING_BINARIES_NAME, szSrcBinPath, szWinSysPath
  778.         if (OnWIndowsNT()) then
  779.             ' WinG32.DLL must be in Winnt\System32
  780.             szSystem32Path = GetRealWindowsSysDir
  781.             AddSectionFilesToCopyList SETUP_INI_WING32_BINARIES_NAME, szSrcBinPath, szSystem32Path
  782.         else
  783.             AddSectionFilesToCopyList SETUP_INI_WING32_BINARIES_NAME, szSrcBinPath, szWinSysPath
  784.         endif
  785.     '$ENDIF
  786.     '---
  787.  
  788.     '+++
  789.     '$IFDEF NEEDS_VFW
  790.  
  791.         ' Don't need to install VFW on Windows 95, it is already there.
  792.         if OS_Windows95 = 0 then
  793.  
  794.             AddSectionFilesToCopyList "VfW Runtime", szSrcBinPath, szWinSysPath
  795.             AddSectionFilesToCopyList "MPlayer", szSrcBinPath, szWinPath
  796.             AddSectionFilesToCopyList "AVICodecs", szSrcBinPath, szWinSysPath
  797.  
  798.             '+++
  799.             '$IFNDEF NEEDS_WIN32S
  800.                 ' Win32s has its own 32-bit OLE
  801.                 AddSectionFilesToCopyList "OLE2", szSrcBinPath, szWinSysPath
  802.             '$ENDIF
  803.             '---
  804.         end if
  805.     '$ENDIF
  806.  
  807.     '$IFDEF NEEDS_SOUND
  808.         ' Don't need to install Sound on Windows 95, it is already there.
  809.         if OS_Windows95 = 0 then
  810.             if fSystemUpdated = 1 then
  811.                 AddSectionFilesToCopyList "ACM Drivers", szSrcBinPath, szWinSysPath
  812.             end if
  813.         end if
  814.     '$ENDIF
  815.  
  816.     RestoreCursor(cursor%)
  817.  
  818. End Sub
  819.  
  820. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  821. Sub UpdateFonts() STATIC
  822.     ' Check TT enabled
  823.     MakeListFromSectionFilename "Fonts_list", "Fonts"
  824.  
  825.     listLength% = GetListLength("Fonts_list")
  826.     if listLength% > 0 then
  827.         ' Check to see if the list is just a placeholder or a real list.
  828.         szFontFile$ = GetListItem("Fonts_list", 1)
  829.         if szFontFile <> "NOFONT.ZZZ" then
  830.             ' Do the Win.ini entries
  831.             RegisterFonts
  832.  
  833.             for item% = 1 to listLength%
  834.                 szFontFile = GetListItem("Fonts_list", item%)
  835.                 ' Check if exists
  836.                 ' Install font
  837.                 ret% = InstallFont(MakePath(szSrcBinPath, szFontFile))
  838.                 ' Write WIN.INI
  839.             next
  840.         end if
  841.     end if
  842. End Sub
  843.  
  844. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  845. Sub CreateReg() STATIC
  846.  
  847.     ' The MMAPP.INI path
  848.     szDKRegIni = szWinDrive + ":" +  DKREG_INI_PATH
  849.  
  850.     if DoesFileExist( szDKRegIni, femExist) = 0 then
  851.         'dkreg.ini doesn't exist - initialize AppCount, create dir, add to InstalledApp
  852.         AppCount% = 1
  853.         CreateDir (szWinDrive+":"+DKREG_INI_DIR), cmoNone
  854.         CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  855.         szNum$=str$(AppCount%)
  856.         CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_PRODUCTNAME, cmoOverwrite
  857.         '$IFDEF WITH_FULL_SAMPLER
  858.             ' Create separate Sampler entry
  859.             AppCount% = 2
  860.             CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  861.             szNum$=str$(AppCount%)
  862.             CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_SAMPLER, cmoOverwrite
  863.         '$ENDIF
  864.     else
  865.         if DoesIniSectionExist( szDKRegIni, STR_PRODUCTNAME )=1  then
  866.             szDiffPath$=GetIniKeyString(szDKRegIni, STR_PRODUCTNAME, "Path")
  867.             if(szDestPath$  <> szDiffPath$) then
  868.                 ' product is also installed in a different dir - delete files and dir and ini section
  869.                 ret% = DeleteFiles (szDiffPath, STR_PRODUCTNAME, szDKRegIni)
  870.                 ret% = DeleteDir (szDiffPath)
  871.                 ret% = DeleteSection(STR_PRODUCTNAME, szDKRegIni)
  872.             endif
  873.             'product is installed in same dir - do nothing, has overwritten files
  874.         else
  875.               'product name does not exist - increment AppCount, add to InstalledApp
  876.                szAppCount$ = GetIniKeyString( szDKRegIni, "InstalledApp", "Applications" )
  877.                AppCount% = Val(szAppCount$) + 1
  878.                CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  879.                'assign product to first available number (maybe gaps due to deletion)
  880.                i%=1
  881.                while( GetIniKeyString( szDKRegIni, "InstalledApp",str$(i%) )<>"")
  882.                    i=i+1
  883.                wend
  884.                szNum$=str$(i%)
  885.                CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_PRODUCTNAME, cmoOverwrite
  886.         endif
  887.  
  888.         '$IFDEF WITH_FULL_SAMPLER
  889.             ' Create separate Sampler entry
  890.             if DoesIniSectionExist( szDKRegIni, STR_SAMPLER )=1  then
  891.                 szDiffPath$=GetIniKeyString(szDKRegIni, STR_SAMPLER, "Path")
  892.                 if(szFullSampPath$  <> szDiffPath$) then
  893.                     ' Sampler is installed in a different dir - delete files and dir and ini section
  894.                     ret% = DeleteFiles (szDiffPath, STR_SAMPLER, szDKREgIni)
  895.                     ret% = DeleteDir (szDiffPath)
  896.                     ret% = DeleteSection(STR_SAMPLER, szDKREgIni)
  897.                 endif
  898.                 'Sampler is installed in same dir - do nothing, will overwrite files
  899.             else
  900.                 'Sampler does not exist - increment AppCount, add to InstalledApp
  901.                 szAppCount$ = GetIniKeyString( szDKRegIni, "InstalledApp", "Applications" )
  902.                 AppCount% = Val(szAppCount$) + 1
  903.                 CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  904.                 'assign product to first available number (maybe gaps due to deletion)
  905.                 i%=1
  906.                 while( GetIniKeyString( szDKRegIni, "InstalledApp",str$(i%) )<>"")
  907.                     i=i+1
  908.                 wend
  909.                 szNum$=str$(i%)
  910.                 CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_SAMPLER, cmoOverwrite
  911.             endif
  912.         '$ENDIF
  913.      endif
  914.  
  915.     CreateIniKeyValue szDKRegIni, "InstalledApp","RecentLang", LANG_DLL, cmoOverwrite
  916.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Path", szDestPath, cmoOverwrite
  917.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Company", STR_COMPANYNAME, cmoOverwrite
  918.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Readme", STR_README, cmoOverwrite
  919.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Order", STR_ORDER, cmoOverwrite
  920.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Exe", APPLICATION_EXE_FILE, cmoOverwrite
  921.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "1", APPLICATION_INI_FILE , cmoOverwrite  'Ini
  922. '    if szMinimalInstall = "OFF" then
  923.         MakeListFromSectionFilename "BIN_list", "BIN"
  924.         listLength% = GetListLength("BIN_list")
  925.         if listLength% > 0 then
  926.             for item% = 1 to listLength%
  927.                 szBinFile$ = GetListItem("BIN_list", item%)
  928.                 szNum$=str$(item%+1)
  929.                 CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), szBinFile , cmoOverwrite
  930.             next
  931.         end if
  932. '    end if
  933.  
  934. ''$IFDEF SCRUNGED_OR_TEXT
  935.         if OS_Windows95 then
  936.             MakeListFromSectionFilename "BIN_OPT_list", "BIN 32"
  937.         else
  938.             MakeListFromSectionFilename "BIN_OPT_list", "BIN 16"
  939.         end if
  940.  
  941.         listLength% = GetListLength("BIN_OPT_list")
  942.         if listLength% > 0 then
  943.             for Count% =1 to listLength%
  944.                 szBinFile$ = GetListItem("BIN_OPT_list", Count%)
  945.                 szNum$=str$(item%+1)
  946.                 CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), szBinFile , cmoOverwrite
  947.                 item% = item% + 1
  948.             next
  949.         end if
  950. ''$ENDIF
  951.  
  952.  
  953. '$IFDEF WITH_SAMPLER
  954.     szNum$=str$(item%+1)
  955.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), SAMPLER_INI_FILE , cmoOverwrite
  956.     item% = item% + 1
  957. '$ENDIF
  958.  
  959.     ' Add Uninstall only files to the list
  960.     UninstallOnly( item% )
  961.  
  962.  
  963. '$IFDEF WITH_FULL_SAMPLER
  964.     ' Create entries in the sampler section
  965.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Path", szFullSampPath, cmoOverwrite
  966.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Company", STR_COMPANYNAME, cmoOverwrite
  967.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Readme", STR_SAMPLER_README, cmoOverwrite
  968.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Exe", SAMPLER_EXE_FILE, cmoOverwrite
  969.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "1", SAMPLER_INI_FILE , cmoOverwrite  'Ini
  970. '    if szMinimalInstall = "OFF" then
  971.         MakeListFromSectionFilename "SAMP_BIN_list", "SAMPBIN"
  972.         listLength% = GetListLength("SAMP_BIN_list")
  973.         if listLength% > 0 then
  974.             for item% = 1 to listLength%
  975.                 szBinFile$ = GetListItem("SAMP_BIN_list", item%)
  976.                 szNum$=str$(item%+1)
  977.                 CreateIniKeyValue szDKRegIni, STR_SAMPLER, ltrim$(szNum), szBinFile , cmoOverwrite
  978.             next
  979.         end if
  980. '    end if
  981. '$ENDIF
  982.  
  983.     ' Add fonts to the uninstall list.
  984. '    listLength% = GetListLength("Fonts_list")
  985. '    if listLength% > 0 then
  986. '        for item% = 1 to listLength%
  987. '            szFontFile$ = GetListItem("Fonts_list", item%)
  988. '            szNum$=str$(item%)
  989. '            CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME,"F"+ltrim$(szNum), szFontFile, cmoOverwrite
  990. '        next
  991. '    end if
  992.  
  993. End Sub
  994.  
  995.